#pragma once
#include "precompiled.h"

class Player;

class Physics_Character
{
public:
	Physics_Character(void);
	~Physics_Character(void);

	// Create the character as a physical Havok object.
	void Create( hkpWorld* );

	// Get any input for and step this Havok object through the simulation.
	// If this is not a player then give it 0 instead.
	void Update( hkpWorld* m_world, const hkReal& m_timestep, Player* player );

	// Get the rigid body position of this character.
	hkVector4 GetPosition();


private:

	bool cast_ray_gun( hkpWorld* world, glm::vec3 butt, glm::vec3 head, hkUint32 *id );
	void Manage_HitScenery( hkUint32 muid, hkVector4 &intersectionPointWorld );


	hkpShape* m_standShape;
	hkpShape* m_crouchShape;

	hkpCharacterRigidBody* m_characterRigidBody;
	hkpCharacterContext* m_characterContext;

	hkpCharacterStateType prev_state;

	hkpSurfaceInfo*	m_previousGround;
	hkInt32 m_framesInAir;
};

